<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
    <div class="container">
         <table border="1" cellpadding="0" cellspacing="0" width="70%" align="center" class="table table-bordered table-hover">
              <tr>
                  <th>用户编号</th>
                  <th>用户名</th>
                  <th>密码</th>
                  <th>性别</th>
                  <th>角色</th>
                  <th>操作</th>
              </tr>
             <tr th:each="user:${users}">
                  <td th:text="${user.id}"></td>
                 <td th:text="${user.username}"></td>
                 <td th:text="${user.password}"></td>
                 <td th:text="${user.sex} ==0 ? '男': '女'"></td>
                 <td>
                       <span th:each="role:${user.roles}">
                            <span th:text="${role.rname}"></span>
                       </span>
                 </td>
                 <td>
                     <button onclick="window.location.href='/users/add'">新增用户</button>
                 </td>
             </tr>
         </table>
    </div>
</body>
</html>